﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DatabaseTransfer.Forms
{
    public partial class UserInput : Form
    {
        public event EventHandler OnOkButtonClick;

        public string InputValue { get; private set; }
        public UserInput(string labelText)
        {
            InitializeComponent();
            this.inputLabel.Text = labelText;
        }

        private void okBtn_Click(object sender, EventArgs e)
        {
            this.InputValue = this.inputText.Text;
            
            if (OnOkButtonClick != null)
            {
                this.OnOkButtonClick(this, new EventArgs());
            }

            this.Close();
        }
    }
}
